package com.user.service;

import java.util.List;

import com.user.bean.Page;
import com.user.bean.User;

/**
 *  This is user service interface
 * @author LIU
 * @version 1.0 2017-09-21
 */
public interface UserService {

	/**
	 * show all users
	 *TODO
	 *LIU
	 * @return
	 *����7:31:46
	 */
	public List<User> showAll();
	
	/**
	 * Get user by page
	 *TODO
	 *LIU
	 * @return
	 *上午11:40:46
	 */
	public List<User> getUserByPage(Page p);

	/**
	 * user login
	 *TODO
	 *LIU
	 * @param user
	 * @return
	 *����7:31:58
	 */
	public boolean login(User user);

	/**
	 * add user
	 *TODO
	 *LIU
	 * @param user
	 *����7:32:10
	 */
	public int addUser(User user);

	/**
	 * change user information
	 *TODO
	 *LIU
	 * @param user
	 * @param userId
	 * @return
	 *����8:36:23
	 */
	public boolean updateUser(User user, String userId);

	/**
	 * Search user by Id
	 *TODO
	 *LIU
	 * @param userId
	 * @return
	 *����8:50:27
	 */
	public User searchUser(String userId);

	/**
	 * Delete user by Id
	 *TODO
	 *LIU
	 * @param userId
	 * @return
	 *����9:59:11
	 */
	public int deleteUser(String userId);
	
	/**
	 * Get all counts of users
	 *TODO
	 *LIU
	 * @return
	 *上午11:29:58
	 */
	public int searchAllCount();
	
}
